<?php
  include_once('../conn.php');
  $id = $_GET['id'];
  $sql = "delete from category where id = $id";
  // echo $sql;

  $result = mysqli_query($conn, $sql);
  if($result) {
    alert('分类删除成功', 'category_list.php');
  } else {
    alert('分类删除失败', 'category_list.php');
  }

  mysqli_close($conn);
?>